package com.yuexun.beilunpatient.ui.contractmanage.ui;

import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.yuexun.beilunpatient.R;
import com.yuexun.beilunpatient.base.BaseKJActivity;
import com.yuexun.beilunpatient.ui.contractmanage.ui.fragment.Frag_Diagnose_Record;
import com.yuexun.beilunpatient.ui.contractmanage.ui.fragment.Frag_Inspection;
import com.yuexun.beilunpatient.ui.contractmanage.ui.fragment.Frag_Record;
import com.yuexun.beilunpatient.ui.contractmanage.ui.fragment.Frag_Test;
import com.yuexun.beilunpatient.ui.contractmanage.ui.fragment.Frag_Video;

import org.kymjs.kjframe.ui.KJFragment;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by chenss on 2018/3/30 0030.
 */

public class Act_ContractManageRecord extends BaseKJActivity {

    @Bind(R.id.diagnose_record)
    TextView diagnoseRecord;
    @Bind(R.id.diagnose_record_img)
    ImageView diagnoseRecordImg;
    @Bind(R.id.record)
    TextView record;
    @Bind(R.id.record_img)
    ImageView recordImg;
    @Bind(R.id.inspection)
    TextView inspection;
    @Bind(R.id.inspection_img)
    ImageView inspectionImg;
    @Bind(R.id.test)
    TextView test;
    @Bind(R.id.test_img)
    ImageView testImg;
    @Bind(R.id.video)
    TextView video;
    @Bind(R.id.video_img)
    ImageView videoImg;

    private KJFragment fragDiagnoseRecord;
    private KJFragment fragRecord;
    private KJFragment fragInspection;
    private KJFragment fragTest;
    private KJFragment fragVideo;



    @Override
    public void setRootView() {
        setContentView(R.layout.act_contractmanagerecord);
        ButterKnife.bind(this);
    }

    @Override
    public void initData() {
        fragDiagnoseRecord = new Frag_Diagnose_Record();
        fragRecord = new Frag_Record();
        fragInspection = new Frag_Inspection();
        fragTest = new Frag_Test();
        fragVideo = new Frag_Video();
        changeFragment(R.id.doc_content, fragDiagnoseRecord);
    }

    @OnClick({R.id.title_back, R.id.diagnose_record_ll, R.id.record_ll,
            R.id.inspection_ll, R.id.test_ll,R.id.video_ll})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.title_back:
                finish();
                break;
            case R.id.diagnose_record_ll:
                diagnoseRecord.setTextColor(getResources().getColor(R.color.main_text_02));
                diagnoseRecordImg.setBackgroundColor(getResources().getColor(R.color.main_text_02));
                record.setTextColor(getResources().getColor(R.color.txt_black1));
                recordImg.setBackgroundColor(getResources().getColor(R.color.transparent));
                inspection.setTextColor(getResources().getColor(R.color.txt_black1));
                inspectionImg.setBackgroundColor(getResources().getColor(R.color.transparent));
                test.setTextColor(getResources().getColor(R.color.txt_black1));
                testImg.setBackgroundColor(getResources().getColor(R.color.transparent));
                video.setTextColor(getResources().getColor(R.color.txt_black1));
                videoImg.setBackgroundColor(getResources().getColor(R.color.transparent));
                changeFragment(R.id.doc_content, fragDiagnoseRecord);
                break;
            case R.id.record_ll:
                diagnoseRecord.setTextColor(getResources().getColor(R.color.txt_black1));
                diagnoseRecordImg.setBackgroundColor(getResources().getColor(R.color.transparent));
                record.setTextColor(getResources().getColor(R.color.main_text_02));
                recordImg.setBackgroundColor(getResources().getColor(R.color.main_text_02));
                inspection.setTextColor(getResources().getColor(R.color.txt_black1));
                inspectionImg.setBackgroundColor(getResources().getColor(R.color.transparent));
                test.setTextColor(getResources().getColor(R.color.txt_black1));
                testImg.setBackgroundColor(getResources().getColor(R.color.transparent));
                video.setTextColor(getResources().getColor(R.color.txt_black1));
                videoImg.setBackgroundColor(getResources().getColor(R.color.transparent));
                changeFragment(R.id.doc_content, fragRecord);
                break;
            case R.id.inspection_ll:
                diagnoseRecord.setTextColor(getResources().getColor(R.color.txt_black1));
                diagnoseRecordImg.setBackgroundColor(getResources().getColor(R.color.transparent));
                record.setTextColor(getResources().getColor(R.color.txt_black1));
                recordImg.setBackgroundColor(getResources().getColor(R.color.transparent));
                inspection.setTextColor(getResources().getColor(R.color.main_text_02));
                inspectionImg.setBackgroundColor(getResources().getColor(R.color.main_text_02));
                test.setTextColor(getResources().getColor(R.color.txt_black1));
                testImg.setBackgroundColor(getResources().getColor(R.color.transparent));
                video.setTextColor(getResources().getColor(R.color.txt_black1));
                videoImg.setBackgroundColor(getResources().getColor(R.color.transparent));
                changeFragment(R.id.doc_content, fragInspection);
                break;
            case R.id.test_ll:
                diagnoseRecord.setTextColor(getResources().getColor(R.color.txt_black1));
                diagnoseRecordImg.setBackgroundColor(getResources().getColor(R.color.transparent));
                record.setTextColor(getResources().getColor(R.color.txt_black1));
                recordImg.setBackgroundColor(getResources().getColor(R.color.transparent));
                inspection.setTextColor(getResources().getColor(R.color.txt_black1));
                inspectionImg.setBackgroundColor(getResources().getColor(R.color.transparent));
                test.setTextColor(getResources().getColor(R.color.main_text_02));
                testImg.setBackgroundColor(getResources().getColor(R.color.main_text_02));
                video.setTextColor(getResources().getColor(R.color.txt_black1));
                videoImg.setBackgroundColor(getResources().getColor(R.color.transparent));
                changeFragment(R.id.doc_content, fragTest);
                break;
            case R.id.video_ll:
                diagnoseRecord.setTextColor(getResources().getColor(R.color.txt_black1));
                diagnoseRecordImg.setBackgroundColor(getResources().getColor(R.color.transparent));
                record.setTextColor(getResources().getColor(R.color.txt_black1));
                recordImg.setBackgroundColor(getResources().getColor(R.color.transparent));
                inspection.setTextColor(getResources().getColor(R.color.txt_black1));
                inspectionImg.setBackgroundColor(getResources().getColor(R.color.transparent));
                test.setTextColor(getResources().getColor(R.color.txt_black1));
                testImg.setBackgroundColor(getResources().getColor(R.color.transparent));
                video.setTextColor(getResources().getColor(R.color.main_text_02));
                videoImg.setBackgroundColor(getResources().getColor(R.color.main_text_02));
                changeFragment(R.id.doc_content, fragVideo);
                break;
        }
    }
}
